[ -x "$(command -v go)" ] || apk add go
[ -x "$(command -v git)" ] || apk add git

[ -e /root/sillyGirl ] && rm -rf /root/sillyGirl
cd ~ && git clone https://ghproxy.com/https://github.com/cdle/sillyGirl
cd sillyGirl/develop && git clone https://ghproxy.com/https://github.com/ufuckee/jd_cookie

cat > /root/sillyGirl/dev.go <<-EOF
package main

import (

//青龙2.9机器人
_"github.com/cdle/sillyGirl/develop/qinglong" 

//京东账号
_ "github.com/cdle/sillyGirl/develop/jd_cookie"

//腾讯QQ
_"github.com/cdle/sillyGirl/im/qq"

//Te Legram
_"github.com/cdle/sillyGirl/im/tg"

//微信公众号
_"github.com/cdle/sillyGirl/im/wxmp"

//微信号
_"github.com/cdle/sillyGirl/im/wx"
)
EOF

echo -e "机器人管理发送部分命令:\n对接青龙发送:\nset qinglong host http://青龙面板ip:端口\nset qinglong client_id xxx\nset qinglong client_secret xxx\n对接nvjdc发送:\nset jd_cookie nolan_addr http://短信ip:端口"
stty erase ^? && read -p "输入机器人管理QQ号:" QQmasters
[ -e /etc/sillyGirl ] || mkdir -p /etc/sillyGirl
echo "set qq masters $QQmasters" >/etc/sillyGirl/sets.conf

cd /root/sillyGirl && [ -r /root/sillyGirl/sillyGirl ] || go build && ./sillyGirl

